/*
 * @Author: 89-83-77
 * @Description: 请求拦截器配置文件
 * @Date: 2025-03-27 16:58:59
 * @LastEditTime: 2025-03-29 14:33:07
 * @FilePath: \fz-yzt-webd:\work\client\src\utils\request.js
 */
import axios from "axios";

const service = axios.create({//创建axios实例
  baseURL: "http://localhost:3000/api",
  timeout: 5000,
});

// 请求拦截器
service.interceptors.request.use((config) => {
  config.headers.Authorization = localStorage.getItem("token");
  return config;
});

export default service;
